import React, { Component } from 'react'
import Son from './Son'

export default class Father extends Component {
    state = {
        count: 100,
        num: 888
    }
    render() {
        const { count, num } = this.state
        return (
            <div>
                <h3>Father -- { num }</h3>
                <button onClick = {() => {
                    this.setState({
                        num: this.state.num += 1
                    })
                }}>点我</button>
                <Son num = { num }/>
            </div>
        )
    }
}
